import React, { useContext } from 'react'

import "./App.css"

function Parent() {

  return (
    <div className="Parent">
      <p>Parent</p>
      <A demo1={(name)=><B name={name} />}>
        {
        /*
        hello A!
        <B />
        */
        }
      </A>
    </div>
  )
}

function A(props) {
  return (
    <div className="A">
      <p>A</p>
      {props.demo1("hello")}
      {
      /*props.children <B />
      */
      }
    </div>
  )
}

function B(props) {
  return (
    <div className="B">
      <p>B</p>
      <p>接收到:{props.name}</p>
    </div>
  )
}



function App() {
  return (
    <Parent />
  );
}

export default App;
